<template>
  <div class="loding">
    {{loadStr}}
  </div>
</template>
<script setup lang='ts'>
const isShow = ref<boolean>(false)
let loadStr = ref<string>('loading...')
const show = (str:string) => {
  if (str) loadStr.value = str 
  isShow.value = true
  console.log(isShow.value)
}
const hide = (str: string) => {
  if(str)loadStr.value = str 
  isShow.value = false
}
defineExpose({
  isShow,
  show,
  hide
})
</script>

<style scoped lang='less'>
.loding {
  background: black;
  opacity: 0.8;
  font-size: 30px;
  position:fixed;
  z-index: 10;
  top: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 99999;
}
</style>